import { BrowserWindow } from 'electron'
const windowManage = new Map<string, BrowserWindow>()

/**
 * 保存窗口
 * @param window 窗口对象
 */
export const saveWindow = (id, window): void => {
	windowManage.set(id, window)
}

/**
 * 获取窗口
 * @param windowId 窗口id
 */
export const getWindow = (id): BrowserWindow | undefined => {
	return windowManage.get(id)
}

/**
 * 删除窗口
 * @param windowId 窗口id
 */
export const deleteWindow = (id): void => {
	windowManage.delete(id)
}
